package com.fone.player.view;

import com.fone.player.util.L;

import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;

public class LocalViewPager extends ViewPager {

	private boolean isCanScroll = true;

	public LocalViewPager(Context context) {
		super(context);
	}

	public LocalViewPager(Context context, AttributeSet attrs) {
		super(context, attrs);
	}

	public void setcanScroll(boolean isCanScroll) {
		this.isCanScroll = isCanScroll;
		L.i("local viewpager:", "set isCanScroll:" + isCanScroll);
	}


	@Override
	public void scrollTo(int x, int y) {
		if (isCanScroll) {
			L.i("local viewpager:", "isCanScroll:" + isCanScroll);
			super.scrollTo(x, y);
		}
	}


}
